QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Creating and Editing Points

QuickDraw 3D provides routines that you can use to create and manipulate points. See "Point Objects" for the definition of the point object.

Q3Point_New

You can use the Q3Point_New function to create a new point.

TQ3GeometryObject Q3Point_New (const TQ3PointData *pointData);
pointData
A pointer to a TQ3PointData structure.

DESCRIPTION

The Q3Point_New function returns, as its function result, a new point object having the location and attributes passed in the fields of the TQ3PointData structure pointed to by the pointData parameter. If a new point object could not be created, Q3Point_New returns the value NULL .

Q3Point_Submit

You can use the Q3Point_Submit function to submit an immediate point for drawing, picking, bounding, or writing.

TQ3Status Q3Point_Submit (
                     const TQ3PointData *pointData,
                     TQ3ViewObject view);
pointData
A pointer to a TQ3PointData structure.
view
A view.

DESCRIPTION

The Q3Point_Submit function submits for drawing, picking, bounding, or writing the immediate point whose location and attribute set are passed in the fields of the TQ3PointData structure pointed to by the pointData parameter. The point is drawn, picked, bounded, or written according to the view characteristics specified in the view parameter.

SPECIAL CONSIDERATIONS

You should call this function only in a submitting loop.

Q3Point_GetData

You can use the Q3Point_GetData function to get the data that defines a point object and its attributes.

TQ3Status Q3Point_GetData (
                     TQ3GeometryObject point,
                     TQ3PointData *pointData);
point
A point.
pointData
On exit, a pointer to a TQ3PointData structure that contains information about the point specified by the point parameter.

DESCRIPTION

The Q3Point_GetData function returns, through the pointData parameter, information about the position and attribute set of the point specified by the point parameter. QuickDraw 3D allocates memory for the TQ3PointData structure internally; you must call Q3Point_EmptyData to dispose of that memory.

Q3Point_SetData

You can use the Q3Point_SetData function to set the data that defines a point object and its attributes.

TQ3Status Q3Point_SetData (
                     TQ3GeometryObject point,
                     const TQ3PointData *pointData);
point
A point.
pointData
A pointer to a TQ3PointData structure.

DESCRIPTION

The Q3Point_SetData function sets the data associated with the point specified by the point parameter to the data specified by the pointData parameter.

Q3Point_EmptyData

You can use the Q3Point_EmptyData function to release the memory occupied by the data structure returned by a previous call to Q3Point_GetData .

TQ3Status Q3Point_EmptyData (TQ3PointData *pointData);
pointData
A pointer to a TQ3PointData structure.

DESCRIPTION

The Q3Point_EmptyData function releases the memory occupied by the TQ3PointData structure pointed to by the pointData parameter; that memory was allocated by a previous call to Q3Point_GetData .

Q3Point_GetPosition

You can use the Q3Point_GetPosition function to get the position of a point.

TQ3Status Q3Point_GetPosition (
                     TQ3GeometryObject point,
                     TQ3Point3D *position);
point
A point.
position
On exit, the position of the specified point.

DESCRIPTION

The Q3Point_GetPosition function returns, in the position parameter, the position of the point specified by the point parameter.

Q3Point_SetPosition

You can use the Q3Point_SetPosition function to set the position of a point.

TQ3Status Q3Point_SetPosition (
                     TQ3GeometryObject point,
                     const TQ3Point3D *position);
point
A point.
position
The desired position of the specified point.

DESCRIPTION

The Q3Point_SetPosition function sets the position of the point specified by the point parameter to that specified in the position parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |